﻿using ContactSMS.Commons.Util;

namespace ContactSMS.Domain.Entity
{
    public class Message
    {
        public long Id { get; set; }
        public long MessageSessionId { get; set; }
        public string Desc { get; set; }
        public bool IsRead { get; set; }
        public long? ContactId { get; set; }
        public long CreatTime { get; set; }
        public long UpdateTime { get; set; }

        public Message()
        {

        }

        public Message(long MessageSessionId, string Desc, bool IsRead = false, long? ContactId = 0)
        {
            this.MessageSessionId = MessageSessionId;
            this.Desc = Desc;
            this.IsRead = IsRead;
            this.ContactId = ContactId;
            this.CreatTime = TimeUtil.GetTimestamp();
            this.UpdateTime = TimeUtil.GetTimestamp();
        }
    }
}
